<?php

namespace App\Http\Requests;

class Demand extends Base
{

    public function rules()
    {
        $rules = [
            'title' => 'required',
            'cate_id' => 'required',
            'price' => 'required',
            'content' => 'required',
            'area' => 'required',
            'end_at' => 'required',
        ];
        return $rules;

    }

    public function messages()
    {
        return [
            'title.required' => '请填写标题',
            'cate_id.required' => '请选择类目',
            'price.required' => '请填写预算',
            'content.required' => '请填写需求描述',
            'area.required' => '请选择区域',
            'end_at.required' => '请选择截止时间',
        ];
    }
}
